var config=require('../../../../config');
Page({
  data: {
    sugInfo:{
      activity_id:'',
      content:''
    }
  },

  onLoad: function () {
    var that=this;
    wx.getStorage({
      key: 'actInfo',
      success: function(res) {
        that.data.sugInfo.activity_id=res.data.activity_id;
      },
    });
  },
  chsact: function(){

  },
  sugInput:function(e){
    console.log(e);
    this.data.sugInfo.content=e.detail.value;
  },
  sug_submit: function(){
    var that=this;
    if(this.data.suggestion=='') return;
    else{
      wx.request({
        url: config.host+'/corAdmin/newSug',
        data:that.data.sugInfo,
        method:'POST',
        success:function(res){
          console.log('发表建议成功');
        }
      })
    }
  }
 

})

